<template>
	<view class="about-us">
		<image class="bg" src="/static/img/mine/bg.png"></image>
		<view class="container">
			<view class="header">
				<view class="bottom">
					<view class="go-back" @tap="goBack">
						<view></view>
					</view>
					<view class="title">关于我们</view>
					<view class="empty"></view>
					<view class="line"></view>
				</view>
			</view>
			<scroll-view scroll-y="true" class="content-box">
				<view class="content">
					<feng-parse :content="html"></feng-parse>
					<!-- <view class="item">公司地址：{{address}}</view> -->
					<view class="item">公司电话：{{mobile}}</view>
					<!-- <view class="item">联系人：{{linkman}}</view> -->
					<view class="item">公司名称：{{name}}</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	import {aboutUs} from '@/commen/js/config'
	import fengParse from '@/components/feng-parse/parse'
	
	export default {
		data() {
			return {
				address: '', // 地址
				mobile: '', // 电话
				linkman: '', // 联系人
				html: '', // 内容
				name: '', // 名字
			};
		},
		onLoad() {
			this.getAboutUs()
		},
		components: {
			fengParse
		},
		methods: {
			// 返回
			goBack() {
				this.$close(1)
			},
			// 获取信息
			async getAboutUs() {
				const [err, res] = await aboutUs()
				console.log(res)
				if (res) {
					this.address = res.info.company_address
					this.mobile = res.info.company_phone
					this.linkman = res.info.company_user
					this.html = res.info.company_introduction
					this.name = res.info.company_name
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	@import '@/static/scss/config.scss';
	@import '@/static/scss/mixin.scss';
	

	.about-us {
		position: relative;
		@include box-w(100%);

		.bg {
			@include square(100%);
			display: block;
		}

		.container {
			@include square(100%);
			@include cross(absolute);
			z-index: 999;

			.header {
				@include top(0, fixed)
				@include box(100%, 262rpx);
				@include flex-row(center, flex-end);

				.bottom {
					position: relative;
					@include box(100%, 148rpx);
					@include flex-row();

					.line {
						@include box(690rpx, 2rpx, $bg-c);
						@include bottom();
					}

					.go-back,
					.empty {
						@include box(76rpx, 148rpx);
					}

					.go-back {
						@include flex-row();

						&>view {
							@include box-bg(16rpx, 28rpx, '');
						}
					}

					.title {
						flex-grow: 1;
						@include flex-row();
						@include font-set($font-d, $color-a, 500);
					}
				}

			}
			
			.content-box {
				@include square(100%);
				padding-top:262rpx;
				.content{
					@include box-w(100%);
					@include font-set($font-b, $color-a);
					padding:10rpx 30rpx;
					.item{
						margin-bottom: 25rpx;
						margin-top: 25rpx;
					}
				}
			}
		}
	}
</style>
